import { request } from "./req";

export function _getCommentNew(id, type, pageNo, sortType, cursor) {
  return request({
    url: "/comment/new",
    params: { id, type, pageNo, sortType, cursor },
  }).catch((err) => err.response);
}

// 给评论点赞/取消点赞
export function _likeComment(id, cid, t, type) {
  return request({
    url: "/comment/like",
    params: { id, cid, t, type },
  }).catch((err) => err.response);
}

// 查看楼层评论
export function _getparentComment(parentCommentId, id, type, time) {
  return request({
    url: "/comment/floor",
    params: { parentCommentId, id, type, time },
  }).catch((err) => err.response);
}
